/*
 * Created on 13/Dez/2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package hubsniffer;

import libjdc.dc.client.Hub;

/**
 * @author Daniel Botelho
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class DCHub extends Hub{
    public static final int HUB_ID = 1;
    public static final int HUB_ADDRESS = 2;
    public static final int HUB_PORT = 3;
    public static final String HUB_TYPE_ID = "hub_type_id";
    
    //Isto vem da BD
    private int hub_id;
    
    private static int DEFAULT_PORT = 411;
    private static String DEFAULT_HUBANME = "";
    
    /*private String hubName ="";
    private String hubTopic ="";
    private String hubAddress="";
    private String hubDescription="";
    private String hubMaxUsers="0";
    private String hubMinShare="0";
    private String hubMinSlots="0";
    private String hubMaxHubs="0";
    private String hubType;
    private String hubOwner;*/
    
   /* private String host;
    private int port;*/
    
    private int hub_type;
    
    //private HubSession hubSession;
    //private HubInfo hubInfo;
    
    /*public Hub(String host) {
        this(DEFAULT_HUBANME,host,DEFAULT_PORT);
    }*/
    
    public DCHub(int hub_id,String host,int port, int hub_type) {
        this(hub_id,DEFAULT_HUBANME,host,port,hub_type);
    }
    
    public DCHub(int hub_id,String hubName,String host,int port, int hub_type) {
        super(host,port);
        this.hub_id = hub_id;
        this.getHubInfo().setName(hubName);
        this.setHub_type(hub_type);
    }
    
    
     public int getHub_id() {
        return hub_id;
    }
    
    /**
     * @return Returns the hubName.
     */
    public String getHubName() {
        return this.getHubInfo().getName();
    }
    /**
     * @param hubName The hubName to set.
     */
    public void setHubName(String hubName) {
        this.getHubInfo().setName(hubName);
    }
    /**
     * @return Returns the hubLog.
     *
    public HubSession getHubSession() {
        return hubSession;
    }*/
    /**
     * @return Returns the dEFAULT_HUBANME.
     */
    public static String getDEFAULT_HUBANME() {
        return DEFAULT_HUBANME;
    }
    /**
     * @param default_hubanme The dEFAULT_HUBANME to set.
     */
    public static void setDEFAULT_HUBANME(String default_hubanme) {
        DEFAULT_HUBANME = default_hubanme;
    }
 /*   
    public String toString(){
        return hub_id+"-"+getHost()+":"+getPort()+" -> "+ getHub_type();
    }

    public String getHubDescription() {
        return this.getHubInfo().getDescription();
    }

    public void setHubDescription(String hubDescription) {
        this.getHubInfo().setDescription(hubDescription);
    }

    public String getHubMaxUsers() {
        return this.getHubInfo().getMax_users()+"";
    }

    public void setHubMaxUsers(String hubMaxUsers) {
        this.getHubInfo().setMax_users(hubMaxUsers);
    }

    public String getHubMinShare() {
        return hubMinShare;
    }

    public void setHubMinShare(String hubMinShare) {
        this.hubMinShare = hubMinShare;
    }

    public String getHubMinSlots() {
        return hubMinSlots;
    }

    public void setHubMinSlots(String hubMinSlots) {
        this.hubMinSlots = hubMinSlots;
    }

    public String getHubMaxHubs() {
        return hubMaxHubs;
    }

    public void setHubMaxHubs(String hubMaxHubs) {
        this.hubMaxHubs = hubMaxHubs;
    }

    public String getHubAddress() {
        return hubAddress;
    }

    public void setHubAddress(String hubAddress) {
        this.hubAddress = hubAddress;
    }

    public String getHubTopic() {
        return hubTopic;
    }

    public void setHubTopic(String hubTopic) {
        this.hubTopic = hubTopic;
    }*/

    public int getHub_type() {
        return hub_type;
    }

    public void setHub_type(int hub_type) {
        this.hub_type = hub_type;
    }
/*
    public HubInfo getHubInfo() {
        return hubInfo;
    }

    public void setHubInfo(HubInfo hubInfo) {
        this.hubInfo = hubInfo;
    }*/
}
